package com.example.entity;

import com.example.dto.SentenceResult;
import com.example.entity.parent.Parent;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.ArrayList;

@Data
@Entity
@Table(name = "record")
public class Record extends Parent {

    @Column(name = "user_id", length = 30)
    @ApiModelProperty("用户id")
    private String userId;

    @Column(name = "sentence_id", length = 30)
    @ApiModelProperty("句子id")
    private String sentenceId;

    @Column(name = "sentenceAndGrade")
    @ApiModelProperty("句子内容和成绩")
    private String sentenceAndGrade;

    @Transient
    @ApiModelProperty("句子内容")
    private String sentenceContent;

    @Transient
    @ApiModelProperty("句子返回列表")
    private ArrayList<SentenceResult> sentenceResults;

    @ApiModelProperty("测评成绩")
    @Column(name = "grade", length = 3)
    private int grade;

    @Transient
    @ApiModelProperty("主题名")
    private String topicName;

}
